﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Skin2D.Bone;
using System.Drawing.Drawing2D;
using System.Drawing;

namespace Skin2D.Display
{
    class BoneDraw : IDrawCall
    {
        public BoneDraw(Bone2D bone)
        {
            root = bone;
            pen = new Pen(Color.Red);
            pen.Width = 3;
            pen.EndCap = LineCap.ArrowAnchor;
        }

        public void OnDraw(System.Drawing.Graphics g)
        {
            Matrix backup = g.Transform;

            root.Draw(ref g, pen);
            
            g.Transform = backup;

        }

        private Bone2D root;
        private Pen pen;
    }
}
